<extend name="Public/base"/>

<block name="body">
    <div class="main-title">
        <h2>新增分类</h2>
    </div>
    <form action="{:U('Common/addCommon')}" method="post" class="form-horizontal">
        <div class="form-item">
            <label class="item-label">微信头像</label>
            <div class="controls">
                <img src="{$data.headimgurl}" alt="">
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">会员卡号</label>
            <div class="controls">
                <input type="text" class="text input-large" name="card" value="{$data.card|default=''}">
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">用户昵称</label>
            <div class="controls">
                <input type="text" class="text input-large" value="{$data.nickname|default=''}" disabled>
            </div>
        </div>
        <!-- <div class="form-item">
            <label class="item-label">用户分组</label>
            <div class="controls">
            <select name="gid">
                <option value="0" selected="">--请选择--</option>
                <volist name="m_class_list" id="v">
                    <option value="{$v.id}" <if condition="$v['id'] eq $data['gid']">selected="selected"</if>>{$v.name}</option>          
                </volist>
            </select>               
            </div>
        </div> -->
        <div class="form-item">
            <label class="item-label">性别</label>
            <div class="controls">
                <label class="radio">
                    <input type="radio" value="1" name="sex" <if condition="$data['sex'] eq 1">checked="checked"</if> disabled>男                                    
                </label>
                <label class="radio">
                    <input type="radio" value="2" name="sex" <if condition="$data['sex'] eq 2">checked="checked"</if> disabled>女                                    
                </label>
                <label class="radio">
                    <input type="radio" value="0" name="sex" <if condition="$data['sex'] eq 0">checked="checked"</if> disabled>未知                                    
                </label>
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">联系电话</label>
            <div class="controls">
                <input type="text" class="text input-large" name="phone" value="{$data.phone|default=''}">
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">区域</label>
            <div class="controls">
                <input type="text" class="text input-large" value="{$data.area|default=''}" disabled>
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">积分</label>
            <div class="controls">
                <input type="text" class="text input-large" name="score" value="{$data.score|default=''}">
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">来店总次数</label>
            <div class="controls">
                <input type="text" class="text input-large" name="come_count" value="{$data.come_count|default=''}">
            </div>
        </div>
        <div class="form-item">
            <input type="hidden" name="table" value="clients">
            <input type="hidden" name="methods" value="Member">
            <input type="hidden" name="fields" value="gid,text;score,text;come_count,text;phone,text;card,text">
            <input type="hidden" name="id" value="{$data.id|default=0}">
            <button class="btn submit-btn ajax-post" id="submit" type="submit" target-form="form-horizontal">确 定</button>
            <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
        </div>
    </form>
</block>

<block name="script">
    <script type="text/javascript">
        //导航高亮
        highlight_subnav('{:U('MemberClass/index')}');
    </script>
</block>
